#include "output.h"
#include <sstream>
#include <iostream>
class cls{
		private:
				string str;
		public:
				cls(string s):str(s) {};
				template <typename cname> cls operator*(cname c){
					return str+" "+ToString(c);
				}
				cls operator*(cls c){
					return str+c.str;
				}
				friend ostream& operator<<(ostream& output, const cls& c);
};

ostream& operator<<(ostream& output, const cls& c){
	output << c.str;
	return output;
}


  
template <typename PrintableType> string ToString(PrintableType po){
  ostringstream oss;
  oss << po;
  return oss.str();
}


int main(){
  Bool B(true);
  cls c1("Rong"), c2("Xiao");
  cout << c1*c2 <<endl;
  cout << c1*B << endl;
  cout << c1*"is a good man!" << endl;
  cout << c1*15 << endl;
  cout << c1*'c'*B*18 << endl;
  return 0;
}
